{% extends "howto" %}

{% block main %}
<h2>Application kits</h2>

<p>More than just libraries, <em>Kits</em> can provide software components to use or framework's code to use for your appluications, or complete web applications to integrate into your web site. To achieve this, Webappkit uses a full objet-oriented model.
Every Kit is an instance of, or derived from the <q>Webappkit</q> class, which you get by the static method <kbd>getkit</kbd> :</p>
<code>// getting the "exemple" kit singleton instance
<var>$kit</var>=&amp;Webappkit::getkit('example');</code>

<p>Kit's functionalites are provided through kit instance methods, or its members methods. Kit's members are called <em>Tools</em>.</p>

<p>Kits library files are loaded since the first call to <kbd>getkit</kbd>, which always return the same instance for a given kit (singleton).</p>

<p>Application kits able to handle client requests usually have a specific class implementing the <kbd>run</kbd> method like this :</p>
<code><var>$blog</var>=&amp;Webappkit::getkit('blog_engine');
<var>$blog</var>->run();</code>

<p>See <a href="howto/using-tools">Tools</a>.</p>
{% endblock %}
